#ifndef __KERNEL_DEBUG_H
#define __KERNEL_DEBUG_H
void panic_spin(char* filename,int line,const char* func,const char* condition);

/*__VA_ARGS is stander for ...*/
/*__FILE__ means filename;__LINE__ means line num;__func__ means function name in C language*/
#define PANIC(...) panic_spin(__FILE__,__LINE__,__func__,__VA_ARGS__)

#ifdef NDEBUG
    #define ASSERT(CONDITION) ((void)0)     // do nothing
#else
    #define ASSERT(CONDITION)  if (CONDITION) {} else {PANIC(#CONDITION);}
#endif   //__NDEBUGE
#endif   //__KERNEL_DEBUG_H






